<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<body>
    <!--谁的模板 谁自己负责解析-->
    <div id="app">
        全局组件: <v-test :flag="flag"></v-test>
    </div>
</body>
<script src="../js/vue.js"></script>
<script>
    Vue.config.productionTip = false;
    Vue.component("v-test", {
        //props data methods computed中不能出现同名属性!!!!
        props: ["flag"], //接受父组件传递来的哪些数据
        template: "<strong>v-test:{{flag}}</strong>"
    })

    new Vue({
        el: "#app",
        data: {
            msg: "message from data",
            flag: "flag from app"
        }
    })
</script>

</html>